package com.boyon.system.entity;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import com.boyon.common.request.RequestEntity;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 
 * ClassName: Role <br/>
 * Function: 角色实体类. <br/>
 * date: 2018年3月13日 上午11:31:34 <br/>
 * 
 * @author sunshulin
 * @version
 * @since JDK 1.8
 */
@Entity
@Table(name = "sys_role", catalog = "boyon_system")
@Data
@EqualsAndHashCode(callSuper=false)
public class Role extends RequestEntity implements java.io.Serializable {

	/**
	 * serialVersionUID:
	 * 
	 * @since JDK 1.8
	 */
	private static final long serialVersionUID = -302304405398231863L;
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "role_id", unique = true, nullable = false)
	private Long roleId;
	@Column(name = "role_name", length = 32)
	private String roleName;
	@Column(name = "role_type")
	private Integer roleType;
	@Column(name = "authority", length = 65535)
	private String authority;
	@Column(name = "summary", length = 128)
	private String summary;
	@Column(name = "remark", length = 128)
	private String remark;
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", length = 19)
	private Date createTime;
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_time", length = 19)
	private Date updateTime;
	@Column(name = "status")
	private Integer status;
	@Column(name = "is_system")
	private Integer isSystem;
	@Column(name = "relation_id")
	private Long relationId;
	@Transient
	private String menu;

}